@import './variables.less';

.el-form-item {
	&.is-required {
		&:not(.is-no-asterisk) {
			> .el-form-item__label {
				&:before {
					right: 0;
				}
			}
		}
	}
}

.zb-form {
	.el-form-item__label {
		color: @gray47;
	}
	&:not(.no-test) {
		.el-form-item:not(.is-required) {
			.el-form-item__label {
				padding-left: 9px;
			}
		}
	}
	.el-form-item {
		&.hasUnit {
			position: relative;
			.el-input__inner {
				padding-left: 10px;
				padding-right: 35px;
			}
			.unit {
				position: absolute;
				right: 6px;
				font-size: 14px;
				color: #474747;
			}
		}
	}
}

.zb-form {
	width: 460px;
	&.rule-form {
		width: 100%;
	}
}

.zb-inline-form.hide_label {
	.el-form-item {
		.el-form-item__content {
			margin-left: 0 !important;
			width: 100px;
		}
	}
	.el-form-item:not(:first-child) {
		.el-form-item__label {
			display: none;
		}
	}
}

.zb-inline-form {
	display: flex;
	align-items: center;
	.el-form-item {
		.el-form-item__content {
			margin-left: 0 !important;
		}
	}
}

.zb-inline-form.rule-inline-form {
	.el-form-item__label {
		padding-right: 10px;
	}
}

.daysRules {
	.zb-inline-form.rule-inline-form {
		.el-form-item__label {
			padding-right: 18px;
		}
	}
}

.zb-form {
	.el-form-item.short-input {
		.el-form-item__content {
			width: 80px;
		}
	}
	.el-radio-group {
		&.radio-rule-type {
			.el-radio {
				width: 110px;
			}
		}
		.el-radio {
			float: left;
			width: 140px;
			padding-right: 20px;
			margin: 0;
			padding: 10px 0;
		}
		&.rule-times-radio {
			.el-radio {
				float: left;
				width: 110px;
				padding-right: 20px;
				margin: 0;
				padding: 10px 0;
			}
		}
	}

	.el-form-item.form-item-without-lable {
		.el-form-item__label {
			display: none;
		}
	}

	.short-input-item.el-form-item {
		.el-form-item__content {
			width: 105px;
		}
	}

	.plate-input-item.el-form-item {
		.el-form-item__content {
			width: 175px;
		}
	}
	.select-form-item.zb-inline-form {
		.el-form-item__content {
			width: 160px;
		}
	}
}

.custom-input {
	.el-input-group__append {
		background-color: @blue;
		border: none;
		cursor: pointer;
	}
}

.zb-disabled-form .el-input.is-disabled .el-input__inner {
	background-color: #f5f7fa;
	border-color: #e4e7ed;
	color: #555;
	cursor: not-allowed;
}

.change-mode-bd {
	.el-input--prefix .el-input__inner {
		padding-right: 15px;
	}
}

.zb-inline-form.week-item {
	.el-form-item {
		display: flex;
		.el-form-item__label {
			width: 100px;
		}
		.el-form-item__content {
			flex: 1;
			.el-checkbox {
				margin-left: 0;
				margin-right: 20px;
			}
		}
	}
}

.zb-upload-img {
	.el-upload-list--picture .el-upload-list__item-name i {
		display: none;
	}

	.el-upload-list__item .el-icon-close {
		display: none !important;
	}
}

.device-form {
	.el-form-item {
		margin-bottom: 10px;
		.el-form-item__label,
		.el-form-item__content {
			line-height: 32px;
		}
		.el-form-item__content {
			text-align: right;
			color: #333;
		}
		.el-form-item__label {
			padding-right: 10px;
		}
		&:last-child {
			margin-bottom: 0;
		}
		&.error {
			.el-form-item__content {
				color: @red;
			}
		}
	}
}

.edit-feature-form {
	.el-form-item {
		&.mb0 {
			margin-bottom: 0 !important;
		}
		.el-form-item__label {
			padding-right: 10px;
		}
	}
}

.featrue-form {
	width: 250px;
	.el-form-item {
		margin-bottom: 10px;
		.el-form-item__label,
		.el-form-item__content {
			line-height: 32px;
		}
		.el-form-item__content {
			text-align: left;
			color: #333;
		}
		.el-form-item__label {
			padding-right: 10px;
		}
		&:last-child {
			margin-bottom: 0;
		}
	}
}

.edit-channel-form {
	.sel-input-number--small {
		line-height: 28px;
	}
}

.edit-feature-form-box {
	.zb-inline-form {
		margin-bottom: 12px;
		&:last-child {
			margin-bottom: 0;
		}
		.el-checkbox {
			margin-right: 20px;
		}
		.el-form-item__content {
			width: 214px;
		}
	}
}
